######################################################################################
#
# This file was provided as part of the SharePoint Mystery Deployment package
# Created by Christopher Kimbell (http://sharepointmystery.com)
#
######################################################################################

# -----------------------------------------------------------------
#
# This is a sample file representing setting relevant across
# multiple environments (dev, test, prod)
#
# -----------------------------------------------------------------


#-----------------------------------------------------------------
# Common information across all environments
# -----------------------------------------------------------------

. .\SPM.Types.ps1
. .\SPM.DefaultTopology.ps1

#-----------------------------------------------------------------
# Farm settings
# -----------------------------------------------------------------
$farm.Solutions = @("Mystery.SharePoint.Foundation.wsp", "Mystery.SharePoint.Server.wsp", "Magical.Collaboration.wsp", "Magical.RecordCenter.wsp", "Magical.Search.wsp", "Magical.Publishing.wsp")
#-----------------------------------------------------------------
# Support application settings
# -----------------------------------------------------------------
$supportApp.ApplicationType ="Support"
$supportApp.DB.Name = "Support_Content_DB01"
$supportApp.DB.RecoveryModel = "FULL"

$supportApp.DefaultZone.HostNameStart = "support"
$supportApp.InternetZone.HostNameStart = "support"
$supportApp.InternetZone.Protocol = "https"
$supportApp.InternetZone.Enabled = $true
$supportApp.InternetZone.Port = 443

$supportApp.SC.Title = "Support application"
$supportApp.SC.Description = "A support application that end-users may use to manage the system. i.e content type hubs"
$supportApp.SC.Features = @()
$supportApp.SC.Template = "STS#0"

$supportApp.Pool.Name = "SharePoint Web Applications"

$supportApp.Features = @("SPM.AppInfrastructure")
$supportApp.Solutions = @()
$supportApp.ManagedPaths = @()

$supportApp.BlobCache.Enabled = $true

#-----------------------------------------------------------------
# My Site application settings
# -----------------------------------------------------------------
$mySiteApp.ApplicationType ="MySite"
$mySiteApp.EnableSSC = $true
$mySiteApp.DB.Name = "MySite_Content_DB01"
$mySiteApp.DB.RecoveryModel = "FULL"

$mySiteApp.DefaultZone.HostNameStart = "mysite"
$mySiteApp.InternetZone.HostNameStart = "mysite"
$mySiteApp.InternetZone.Protocol = "https"
$mySiteApp.InternetZone.Enabled = $true
$mySiteApp.InternetZone.Port = 443

$mySiteApp.SC.Title = "My Site Host"
$mySiteApp.SC.Description = "Host for all My Sites"
$mySiteApp.SC.Features = @()
$mySiteApp.SC.Template = "SPSMSITEHOST#0"

$mySiteApp.Pool.Name = "SharePoint Web Applications"

$mySiteApp.Features = @("SPM.AppInfrastructure")
$mySiteApp.Solutions = @()
$mySiteApp.ManagedPaths = @("personal")

$mySiteApp.BlobCache.Enabled = $true

#-----------------------------------------------------------------
# Publishing application settings
# -----------------------------------------------------------------
$publishingApp.ApplicationType ="Publishing"
$publishingApp.DB.Name = "Publishing_Content_DB01"
$publishingApp.DB.RecoveryModel = "FULL"

$publishingApp.DefaultZone.HostNameStart = "pub"
$publishingApp.InternetZone.HostNameStart = "pub"
$publishingApp.InternetZone.Protocol = "https"
$publishingApp.InternetZone.Enabled = $true
$publishingApp.InternetZone.Port = 443

$publishingApp.SC.Title = "Publishing portal"
$publishingApp.SC.Description = "A place where information is published"
$publishingApp.SC.Features = @()
$publishingApp.SC.Template = "BLANKINTERNETCONTAINER#0"

$publishingApp.Pool.Name = "SharePoint Web Applications"

$publishingApp.Features = @("SPM.AppInfrastructure")
$publishingApp.Solutions = @()
$publishingApp.ManagedPaths = @()

$publishingApp.BlobCache.Enabled = $true
$publishingApp.BlobCache.MaxSize = 25

#-----------------------------------------------------------------
# Collaboration application settings
# -----------------------------------------------------------------
$collaborationApp.ApplicationType ="Collaboration"
$collaborationApp.EnableSSC = $true
$collaborationApp.DB.Name = "Collaboration_Content_DB01"
$collaborationApp.DB.RecoveryModel = "FULL"

$collaborationApp.DefaultZone.HostNameStart = "col"
$collaborationApp.InternetZone.HostNameStart = "col"
$collaborationApp.InternetZone.Protocol = "https"
$collaborationApp.InternetZone.Enabled = $true
$collaborationApp.InternetZone.Port = 443

$collaborationApp.SC.Title = "Collaboration portal"
$collaborationApp.SC.Description = "A place where people can collaborate"
$collaborationApp.SC.Features = @()
$collaborationApp.SC.Template = "STS#0"

$collaborationApp.Pool.Name = "SharePoint Web Applications"

$collaborationApp.Features = @("SPM.AppInfrastructure")
$collaborationApp.Solutions = @()
$collaborationApp.ManagedPaths = @()

$collaborationApp.BlobCache.Enabled = $true

$collaborationApp.SiteProvisiongSettings.WebTemplates = @("{8e21516e-91a2-49d5-8a25-66be90576f01}#ProjectTemplate", "{8e21516e-91a2-49d5-8a25-66be90576f01}#DepartmentTemplate")
$collaborationApp.SiteProvisiongSettings.AuthenticationProviders = @()
$collaborationApp.SiteProvisiongSettings.ActiveAuthenticationProvider = "Mystery.SharePoint.EveryoneSiteProvisioningAuthenticationProvider, Mystery.SharePoint.Foundation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=55acf548fb52fc54"

#-----------------------------------------------------------------
# Search application settings
# -----------------------------------------------------------------
$searchApp.ApplicationType = "Search"
$searchApp.DB.Name = "Search_Content_DB01"
$searchApp.DB.RecoveryModel = "FULL"

$searchApp.DefaultZone.HostNameStart = "search"
$searchApp.InternetZone.HostNameStart = "search"
$searchApp.InternetZone.Protocol = "https"
$searchApp.InternetZone.Enabled = $true
$searchApp.InternetZone.Port = 443

$searchApp.SC.Title = "Search Center"
$searchApp.SC.Description = "A place where people can find information"
$searchApp.SC.Features = @()
$searchApp.SC.Template = "SRCHCEN#0"

$searchApp.Pool.Name = "SharePoint Web Applications"

$searchApp.Features = @("SPM.AppInfrastructure")
$searchApp.Solutions = @()
$searchApp.ManagedPaths = @()

$searchApp.BlobCache.Enabled = $true
$searchApp.BlobCache.MaxSize = 5

#-----------------------------------------------------------------
# Record Center application settings
# -----------------------------------------------------------------
$recordCenterApp.ApplicationType = "RecordCenter"
$recordCenterApp.DB.Name = "RecordCenter_Content_DB01"
$recordCenterApp.DB.RecoveryModel = "FULL"

$recordCenterApp.DefaultZone.HostNameStart = "rec"
$recordCenterApp.InternetZone.HostNameStart = "rec"
$recordCenterApp.InternetZone.Protocol = "https"
$recordCenterApp.InternetZone.Enabled = $true
$recordCenterApp.InternetZone.Port = 443

$recordCenterApp.SC.Title = "Record Center"
$recordCenterApp.SC.Description = "A place where information is stored for long term storage"
$recordCenterApp.SC.Features = @()
$recordCenterApp.SC.Template = "OFFILE#1"

$recordCenterApp.Pool.Name = "SharePoint Web Applications"

$recordCenterApp.Features = @("SPM.AppInfrastructure")
$recordCenterApp.Solutions = @()
$recordCenterApp.ManagedPaths = @()

$recordCenterApp.BlobCache.Enabled = $false

#-----------------------------------------------------------------
# Access service settings
# -----------------------------------------------------------------
$accessSvc.Pool.Name = "SharePoint Service Applications"

#-----------------------------------------------------------------
# BCS service settings
# -----------------------------------------------------------------
$bcsSvc.Pool.Name = "SharePoint Service Applications"
$bcsSvc.DB.Name = "BusinessConnectivityServices_DB01"
$bcsSvc.DB.RecoveryModel = "FULL"

#-----------------------------------------------------------------
# Excel service settings
# -----------------------------------------------------------------
$excelSvc.Pool.Name = "SharePoint Service Applications"

#-----------------------------------------------------------------
# Managed metadata service settings
# -----------------------------------------------------------------
$metadataSvc.Pool.Name = "SharePoint Service Applications"
$metadataSvc.DB.Name = "ManagedMetadata_DB01"
$metadataSvc.DB.RecoveryModel = "FULL"
$metadataSvc.Hub.Title = "Content Type Hub"
$metadataSvc.Hub.RelativeUrl = "/sites/ContentTypeHub"
$metadataSvc.Hub.Description = "A site collection used for publishing content type"
$metadataSvc.Hub.Features = "ContentTypeHub"
$metadataSvc.Hub.Template = "STS#0"
$metadataSvc.Hub.WebApplication = $supportApp

#-----------------------------------------------------------------
# Performance Point service settings
# -----------------------------------------------------------------
$ppSvc.Pool.Name = "SharePoint Service Applications"
$ppSvc.DB.Name = "PerformancePoint_DB01"
$ppSvc.DB.RecoveryModel = "SIMPLE"

#-----------------------------------------------------------------
# Power Point service settings
# -----------------------------------------------------------------
$pptSvc.Pool.Name = "SharePoint Service Applications"

#-----------------------------------------------------------------
# Search service settings
# -----------------------------------------------------------------
$searchSvc.Pool.Name = "SharePoint Service Applications"
$searchSvc.AdminPool.Name = "SharePoint Service Applications"
$searchSvc.SearchDB.Name = "Search_DB01"
$searchSvc.SearchDB.RecoveryModel = "SIMPLE"
$searchSvc.CrawlDB.Name = $searchSvc.SearchDB.Name + "_CrawlStore"
$searchSvc.CrawlDB.RecoveryModel = "SIMPLE"
$searchSvc.QueryDB.Name = $searchSvc.SearchDB.Name + "_PropertyStore"
$searchSvc.QueryDB.RecoveryModel = "SIMPLE"

#-----------------------------------------------------------------
# Secure Store service settings
# -----------------------------------------------------------------
$secureStoreSvc.Pool.Name = "SharePoint Service Applications"
$secureStoreSvc.DB.Name = "SecureStore_DB01"
$secureStoreSvc.DB.RecoveryModel = "FULL"

#-----------------------------------------------------------------
# State service settings
# -----------------------------------------------------------------
$stateSvc.DB.Name = "State_DB01"
$stateSvc.DB.RecoveryModel = "SIMPLE"

#-----------------------------------------------------------------
# Usage service settings
# -----------------------------------------------------------------
$usageSvc.DB.Name = "Usage_DB01"
$usageSvc.DB.RecoveryModel = "SIMPLE"

#-----------------------------------------------------------------
# User Profile service settings
# -----------------------------------------------------------------
$userProfileSvc.Pool.Name = "SharePoint Service Applications"
$userProfileSvc.ProfileDB.Name = "UserProfile_Profile_DB01"
$userProfileSvc.ProfileDB.RecoveryModel = "FULL"
$userProfileSvc.SocialDB.Name = "UserProfile_Social_DB01"
$userProfileSvc.SocialDB.RecoveryModel = "FULL"
$userProfileSvc.SyncDB.Name = "UserProfile_Sync_DB01"
$userProfileSvc.SyncDB.RecoveryModel = "SIMPLE"

#-----------------------------------------------------------------
# Visio service settings
# -----------------------------------------------------------------
$visioSvc.Pool.Name = "SharePoint Service Applications"

#-----------------------------------------------------------------
# Web Analytics service settings
# -----------------------------------------------------------------
$analyticsSvc.Pool.Name = "SharePoint Service Applications"
$analyticsSvc.StagingDB.Name = "WebAnalytics_Staging_DB01"
$analyticsSvc.StagingDB.RecoveryModel = "SIMPLE"
$analyticsSvc.ReportingDB.Name = "WebAnalytics_Reporting_DB01"
$analyticsSvc.ReportingDB.RecoveryModel = "FULL"

#-----------------------------------------------------------------
# Word Automation service settings
# -----------------------------------------------------------------
$wordAutomationSvc.Pool.Name = "SharePoint Service Applications"
$wordAutomationSvc.DB.Name = "WordAutomation_DB01"
$wordAutomationSvc.DB.RecoveryModel = "FULL"

#-----------------------------------------------------------------
# Word Viewing service settings
# -----------------------------------------------------------------
$wordViewingSvc.Pool.Name = "SharePoint Service Applications"
